<?php
require('includes/top.php');

$laptop_id = $_POST['laptop_id'];
$laptop_name = $_POST['laptop_name'];
$laptop_model = $_POST['laptop_model'];
$status = $_POST['status'];
$box_no = $_POST['box_no'];
$serial_no = $_POST['serial_no'];
$manufactured_date = $_POST['manufactured_date'];
$depot_location = $_POST['depot_location'];
$laptop_condition = $_POST['laptop_condition'];
$laptop_type = $_POST['laptop_type'];

$sql = "UPDATE laptop_details SET `laptop_name` = '".$laptop_name."', `laptop_model` = '".$laptop_model."', `status` = '".$status."', `box_no` = '".$box_no."', `serial_no` = '".$serial_no."', `manufactured_date` = '".$manufactured_date."', `depot_location` = '".$depot_location."', `laptop_condition` = '".$laptop_condition."', `laptop_type` = '".$laptop_type."' where laptop_id='".trim($laptop_id)."'";
$result=mysql_query($sql);


if($result>0)
{
header('Location: display_laptop_details.php?v=success');
}
else
{
header('Location: display_laptop_details.php?v=err');
}
?>